package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PointsResetRuleMapper;
import com.ruoyi.system.domain.PointsResetRule;
import com.ruoyi.system.service.IPointsResetRuleService;

/**
 * 积分清零规则设置（存储会员积分清零的规则配置）Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-20
 */
@Service
public class PointsResetRuleServiceImpl implements IPointsResetRuleService
{
    @Autowired
    private PointsResetRuleMapper pointsResetRuleMapper;

    /**
     * 通过id查询积分清零规则设置
     *
     * @param id 积分清零规则设置主键
     * @return 积分清零规则设置
     */
    @Override
    public PointsResetRule selectPointsResetRuleById(Long id)
    {
        return pointsResetRuleMapper.selectPointsResetRuleById(id);
    }

    /**
     * 查询积分清零规则设置列表
     *
     * @param pointsResetRule 积分清零规则设置
     * @return 积分清零规则设置
     */
    @Override
    public List<PointsResetRule> selectPointsResetRuleList(PointsResetRule pointsResetRule)
    {
        return pointsResetRuleMapper.selectPointsResetRuleList(pointsResetRule);
    }

    /**
     * 新增积分清零规则设置
     *
     * @param pointsResetRule 积分清零规则设置
     * @return 结果
     */
    @Override
    public int insertPointsResetRule(PointsResetRule pointsResetRule)
    {
        return pointsResetRuleMapper.insertPointsResetRule(pointsResetRule);
    }

    /**
     * 修改积分清零规则设置
     *
     * @param pointsResetRule 积分清零规则设置
     * @return 结果
     */
    @Override
    public int updatePointsResetRule(PointsResetRule pointsResetRule)
    {
        return pointsResetRuleMapper.updatePointsResetRule(pointsResetRule);
    }

    /**
     * 通过id批量删除积分清零规则设置信息
     *
     * @param ids 需要删除的积分清零规则设置主键
     * @return 结果
     */
    @Override
    public int deletePointsResetRuleByIds(Long[] ids)
    {
        return pointsResetRuleMapper.deletePointsResetRuleByIds(ids);
    }

    /**
     * 通过id删除积分清零规则设置信息
     *
     * @param id 积分清零规则设置主键
     * @return 结果
     */
    @Override
    public int deletePointsResetRuleById(Long id)
    {
        return pointsResetRuleMapper.deletePointsResetRuleById(id);
    }
}
